﻿@{
    ViewBag.Title = "Index";
    Layout = "~/Areas/AdminInfo/Views/Shared/_LayoutPage1.cshtml";
}


<div class="container-fluid larry-wrapper">
    <div class="row">
        <div class="col-xs-12 col-sm-12 col-md-12">
            <section class="panel panel-padding">

                <form id="form1" class="layui-form layui-form-pane" data-render="true">
                    @if (ViewBag.SystemList != null)
                    {
                        foreach (Gtkj.CMS.Model.SystemParameter item in ViewBag.SystemList)
                        {
                            <div class="layui-form-item">
                                <label class="layui-form-label">@item.SystemKey</label>
                                <div class="layui-input-block">
                                    <input type="text" name="Value@(item.ID)" value="@(item.SystemValue)" class="layui-input ">
                                </div>
                            </div>
                        }
                    }

                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <button class="layui-btn" lay-submit="" lay-filter="sub">立即提交</button>

                            <button type="reset" class="layui-btn layui-btn-primary">重置</button>

                        </div>
                    </div>
                </form>
            </section>
        </div>
    </div>
</div>

<script>
    var $;
    //var $Type = $("Type");
    layui.use(['form', 'upload', 'layedit', 'jqform', 'laydate'], function () {
        var editIndex;
        $ = layui.jquery,
            jqform=layui.jqform,
         form = layui.form(), layedit = layui.layedit, laydate = layui.laydate;

        form.on('submit(sub)', function (data) {
            $.post('/AdminInfo/AdminSystem/InfoData', data.field, function (r) {
                if (r.status == 200) {
                    layer.msg(r.message);
                } else {
                    layer.msg(r.message);
                }
            });
            return false;
        });

    });
</script>